<?php defined( '_SYS' ) or die( 'No direct script access allowed' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><?php echo $this->title; ?></title>
<?php echo $this->headData; ?>
</head>
<body>

	<div id="toolbar-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>
		<div class="m">
			<div class="toolbar" id="toolbar">
				<table class="toolbar">
					<tr>
						<td class="button" id="toolbar-new">
							<a href="#" onclick="javascript: submitbutton('add')" class="toolbar">
								<span class="icon-32-new" title="New">
								</span>
							<?php echo C_text::_('New');?>
							</a>
						</td>
						<td class="button" id="toolbar-edit">
							<a href="#" onclick="javascript:if(document.adminForm.boxchecked.value==0){alert('<?php echo C_text::_('Tip9');?>');}else{  submitbutton('edit')}" class="toolbar">
								<span class="icon-32-edit" title="Edit">
								</span>
							<?php echo C_text::_('Edit');?>
							</a>
						</td>
						<td class="button" id="toolbar-translation">
							<a href="#" onclick="javascript:if(document.adminForm.boxchecked.value==0){alert('<?php echo C_text::_('Tip9');?>');}else{  submitbutton('translate')}" class="toolbar">
								<span class="icon-32-languages" title="Translation">
								</span>
							<?php echo C_text::_('Translation');?>
							</a>
						</td>
						<td class="button" id="toolbar-default">
							<a href="#" onclick="javascript:if(document.adminForm.boxchecked.value==0){alert('<?php echo C_text::_('Tip9');?>');}else{  submitbutton('defaultlang')}" class="toolbar">
								<span class="icon-32-default" title="default">
								</span>
							<?php echo C_text::_('Default');?>
							</a>
						</td>
						<td class="button" id="toolbar-delete">
							<a href="#" onclick="javascript:if(document.adminForm.boxchecked.value==0){alert('<?php echo C_text::_('Tip8');?>');}else{ if(confirm('<?php echo C_text::_('Tip12');?>'))  submitbutton('remove')}" class="toolbar">
								<span class="icon-32-delete" title="Delete">
								</span>
							<?php echo C_text::_('Delete');?>
							</a>
						</td>												
					</tr>
				</table>
			</div>
			<div class="header icon-48-langmanager"><?php echo C_text::_('ToolBox');?></div>
			<div class="clr"></div>		
		</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
	</div>
	<div id="submenu-box">
			<div class="t">
				<div class="t">
					<div class="t"></div>
		 		</div>
	 		</div>
			<div class="m">

				<div class="submenu-box">
	<div class="submenu-pad">
		<ul id="submenu" class="configuration">
			<li><a href="<?php echo WEBSELF; ?>/language/display/option/site"><?php echo C_text::_('Site');?></a></li>
			<li><a class="active" href="<?php echo WEBSELF; ?>/language/display/option/administrator"><?php echo C_text::_('Administrator');?></a></li>
		</ul>

		<div class="clr"></div>
	</div>
</div>
<div class="clr"></div>
				<div class="clr"></div>
			</div>
<div class="b">
				<div class="b">
		 			<div class="b"></div>
				</div>

			</div>
		</div>
<?php 	
	if($this->message) echo $this->message;
?>
	<div class="clr"></div>
	<div id="element-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>		
		
		
<div class="m">
<form action="<?php echo WEBSELF; ?>/language" method="post" name="adminForm">

	<table class="adminlist" cellpadding="1">
		<thead>
			<tr>
				<th width="5" class="title">
					#
				</th>
				<th width="5" class="title">
					&nbsp;					
				</th>
				<th class="title">
					<?php echo C_html::_('grid.sort',   'Item1', 'a.title', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
				</th>
				<th nowrap="nowrap">
					<?php echo C_text::_( 'Item2'); ?>
				</th>
				<th width="10%" nowrap="nowrap">
					<?php echo C_text::_( 'Item3'); ?>
				</th>
				<th width="10%" nowrap="nowrap">
					<?php echo C_text::_( 'Item4'); ?>
				</th>
				<th width="1%" nowrap="nowrap">
					<?php echo C_html::_('grid.sort',   'Item6', 'a.id', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
				</th>
			</tr>
		</thead>
		<tbody>
		<?php
		
			$k = 0;
			for ($i=0, $n=count( $this->items ); $i < $n; $i++)
			{
				$row =& $this->items[$i];
				$img 	= $row['enabled'] ? 'tick.png' : 'publish_x.png';
				$task 	= $row['enabled'] ? 'block' : 'unblock';
				$alt 	= $row['enabled'] ? C_text::_( 'Enabled' ) : C_text::_( 'Blocked' );
				
			?>
			<tr class="<?php echo "row$k"; ?>">
				<td>
					<?php echo $i+1;?>
				</td>
				<td>
					<input class="cb" type="radio" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row['id']; ?>" onclick="isChecked(this.checked);" />
				</td>
				<td>
					<?php echo $row['title']; ?>
				</td>
				<td>
					<?php echo $row['lang_code']; ?>
				</td>
				<td align="center">
					<a href="javascript:void(0);" onclick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')">
						<img src="<?php echo $this->imagePath.$img;?>" width="16" height="16" border="0" alt="<?php echo $alt; ?>" /></a>
				</td>
				<td align="center">				
					<?php if($row['default']==1):?>
					<img src="<?php echo $this->imagePath.'default.png	';?>" width="16" height="16" border="0" alt="<?php echo C_text::_(''); ?>" />
					<?php endif;?>
				</td>
				<td>
					<?php echo $row['id']; ?>
				</td>
			</tr>
			<?php
				$k = 1 - $k;
				}
			?>
		</tbody>
	</table>

	<input type="hidden" name="task" value="" />
	<input type="hidden" name="option" value="administrator" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
	<?php echo C_HTML::_( 'form.token' ); ?>
</form>
</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
</div>
<center>
	Powered by <b><a href='http://www.metinfo.cn' target='_blank'>MetInfo</a></b> ©2008- <?php echo date('Y',time());?>&nbsp;<a href='http://www.metinfo.cn' target='_blank'>www.MetInfo.cn</a>
</center>
<?php echo $this->js; ?>
</body>
</html>